home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Auge 4000
/
Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).zip
/
Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).adf
/
arp-pro1.3
/
NEW_MANUAL
/
FindFirst_ADDENDUM
< prev
next >
Wrap
Text File
|
1990-06-22
|
3KB
|
63 lines
FindFirst(39.0) ARP Programmers Manual FindFirst(39.0)
ADDENDUM FOR
FindFirst - Search for multilevel pattern match
ADDITIONS IN V1.3
The FindFirst() and FindNext() functions have been rewritten
in V1.3 of ARP to provide built in support for directory
traversal, similar to the "ALL" keyword support available
in various Amiga CLI commands. The enhancement has been
made in a backwards compatible way such that applications
which had used the documented FindFirst() interface prior
to V1.3 of arp.library will continue to work.
The AnchorPath data structure's "ap_Strlen" field, which
was defined as a LONGWORD value in V1.1, has been switched
to a WORD definition. The remaining WORD is split into a
reserved field, and a BYTE ap_Flags field. Any applications
which used FindFirst() under V1.1 initialized the ap_Flags
field to ZERO as the high-order word of ap_Strlen.
The new ALL support is enabled by setting bit APB_DOWILD
in the ap_Flags variable. If this bit is set, you can use
two other bits for directory traversal:
If you SET APB_DODIR when a directory entry has been
returned from FindFirst/FindNext, the next call to
FindNext() will ENTER that directory. If APB_DODIR is
left CLEARED, the next FindNext() call will continue on
the current directory level.
The bit APB_DIDDIR indicates that the current directory
entry has already been processed. Thus, normally you
should check APB_DIDDIR and if it is set do NOT set
APB_DODIR.
Also note the flag bit "APB_ITSWILD" which is set by
FindFirst() to indicate if the name specified is a wildcard.
If APB_ITSWILD is CLEAR, the name passed to FindFirst() is a
simple filename, if SET, the name passed includes some
wildcard characters.
Following is a short pseudocode example for using the new
ALL capability:
anchor->ap_Flags = APF_DOWILD;
rc = FindFirst( pattern, anchor);
while ( rc == 0 )
{
if ( anchor->ap_Info.fib_DirEntryType >= 0 )
{
if ( anchor->Flags & APF_DIDDIR )
anchor->Flags |= APF_DODIR;
anchor->Flags &= ~APF_DIDDIR;
}
}